********************************************************************************
********************************************************************************
****Paper: The Saliency of the CEO Pay Ratio
****Journal: Review of Finance
****Authors: Audra Boone, Austin Starkweather,and Josh White
****Date: October 18, 2023
****Stata: Version 15 for Mac and Version 17 for PC

////////////////////////////////////////////////////////////////////////////////
// -----------------------Identify File Path -------------------------------- //
////////////////////////////////////////////////////////////////////////////////
capture cd "/Users/joshw/CEO Pay Ratio/Analysis/"
use "Data/Temp/dataset_main.dta",clear


////////////////////////////////////////////////////////////////////////////////
// -----------------------Open Log File ------------------------------------- //
////////////////////////////////////////////////////////////////////////////////
log using "Output/Log/payratio_RF.smcl", replace


////////////////////////////////////////////////////////////////////////////////
// -----------------------Install these Stata Packages ---------------------- //
////////////////////////////////////////////////////////////////////////////////
*ssc install reghdfe, replace
*ssc install estout, replace
*ssc install ftools, replace
*ssc install ppmlhdfe, replace
*net describe spost9_ado, from(https://jslsoc.sitehost.iu.edu/stata)
*net install spost9_ado

////////////////////////////////////////////////////////////////////////////////
// ---------------------------------- Tables -------------------------------- //
////////////////////////////////////////////////////////////////////////////////
use "Data/Temp/dataset_main.dta",clear

// ------------------------------------------------------ Table 1: Summary Stats
do Code/produce_table1

// -------------------------------------------------- Table 2: Employee Response
do Code/produce_table2

// ------------------------ Table 3: Employee Response by Industry and Geography
do Code/produce_table3

// ---------------------------------------------------- Table 4: Firm Disclosure
do Code/produce_table4

// -------------------------- Table 5: Employee Based Determinants of Disclosure
do Code/produce_table5

// -------------------------------- Table 6: Firm Response and Employee Outcomes
do Code/produce_table6

// ------------------------------------------- Table 7: Labor Expense Disclosure
do Code/produce_table7

// ------------------------- Table 8: Pay Ratio Components and Employee Response
do Code/produce_table8

// ------------------------------ Table 9: Media Reporting and Employee Outcomes
do Code/produce_table9

// ------------------ Table 10: Employee Pay Satisfaction Using Narrower Windows
do Code/produce_table10


////////////////////////////////////////////////////////////////////////////////
// --------------------------------- Figure --------------------------------- //
////////////////////////////////////////////////////////////////////////////////

// -------------------------------------------- Figure 1: Pay Ratio Distribution
do Code/produce_figure1


////////////////////////////////////////////////////////////////////////////////
// ------------------------------- Appendix C ------------------------------- //
////////////////////////////////////////////////////////////////////////////////

// -------------------------------------------- Table C-1: Glassdoor Correlation
do Code/produce_tableC1

// -------------------------------------------- Table C-2: Glassdoor Correlation
do Code/produce_tableC2

// ---------------------------- Table C-3: Number of Missing Glassdoor Variables
do Code/produce_tableC3


////////////////////////////////////////////////////////////////////////////////
// -----------------------Internet Appendix Tables -------------------------- //
////////////////////////////////////////////////////////////////////////////////

// ---------------------------------------------------- Table IA1: Survey Design
*Created in MS Word 

// --------------------------------------------------- Table IA2: Survey Results
do Code/produce_tableIA2

// -------------------------------------- Table IA3: Tabulated Employee Response
*See output from Code/produce_table2

// ------------ Table IA4: Tabulated Employee Response by Industry and Geography
*See output from Code/produce_table3

// ----------------------------- Table IA5: Tabulated Firm Response to Pay Ratio
*See output from Code/produce_table4

// -------------- Table IA6: Tabulated Employee Based Determinants of Disclosure
*See output from Code/produce_table5

// -------------------- Table IA7: Tabulated Firm Response and Employee Outcomes
*See output from Code/produce_table6

// ----------------------------------- Table IA8: Full Sample Summary Statistics
do Code/produce_tableIA8

// ------------------------------------------------ Table IA9: Transition Matrix
do Code/produce_tableIA9

// --------------------------------------- Table IA10: Supplemental Ratio Change
do Code/produce_tableIA10

// ------- Table IA11: Summary of Pay Ratio Comment Letters Submitted to the SEC
*Created in MS Excel

// ---------------------------- Table IA12: Media Coverage by Pay Ratio Category
do Code/produce_tableIA12

// -------------------------- Table IA13: Alternative Ratio Partitions for Tests
do Code/produce_tableIA13

// ------------------------- Table IA14: Firm Disclosure and Indicator Variables
do Code/produce_tableIA14


////////////////////////////////////////////////////////////////////////////////
// -----------------------Internet Appendix Figures ------------------------- //
////////////////////////////////////////////////////////////////////////////////

// -------------------------- Figure IA1: Pay Ratio Histograms by Reporting Year
do Code/produce_figureIA1

// ----------------------------- Figure IA2: Yearly Changes in the CEO Pay Ratio
do Code/produce_figureIA2

// ------------------- Figure IA3: Yearly Changes in CEO and Median Employee Pay 
do Code/produce_figureIA3

// --------------------------- Figure IA4: Change in CEO and Median Employee Pay 
do Code/produce_figureIA4


////////////////////////////////////////////////////////////////////////////////
// -----------------------Close Log File ------------------------------------ //
////////////////////////////////////////////////////////////////////////////////

capture log close



view "Output/Log/payratio_RF.smcl"
